// 环境配置
const env = {
  development: {
    baseURL: 'http://localhost:8000',
    timeout: 10000
  },
  production: {
    baseURL: 'https://api.meishen.com',
    timeout: 10000
  }
}

// 获取当前环境
const currentEnv = process.env.NODE_ENV === 'production' ? 'production' : 'development'

export const config = {
  ...env[currentEnv],
  
  // API 版本
  apiVersion: '/api/v1',
  
  // 存储键名
  storageKeys: {
    token: 'ms_token',
    userInfo: 'ms_user_info',
    settings: 'ms_settings'
  },
  
  // 页面配置
  pages: {
    login: '/pages/login/index',
    home: '/pages/index/index'
  },
  
  // 上传配置
  upload: {
    maxSize: 10 * 1024 * 1024, // 10MB
    allowTypes: ['image/jpeg', 'image/png', 'image/gif']
  },
  
  // 分页配置
  pagination: {
    defaultPageSize: 20,
    maxPageSize: 100
  }
}

export default config